Attribute VB_Name = "Function"
Public Sub Systray(Valor As Boolean)
    TrayIcon.cbSize = Len(TrayIcon)
    TrayIcon.hWnd = TrayForm.hWnd
    TrayIcon.uId = vbNull
    TrayIcon.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
    TrayIcon.ucallbackMessage = WM_MOUSEMOVE
    TrayIcon.hIcon = TrayForm.Image1
    TrayIcon.szTip = "Shut Control" & Chr$(0)
    If Valor = True Then
        Call Shell_NotifyIcon(NIM_ADD, TrayIcon)
    Else
        Call Shell_NotifyIcon(NIM_DELETE, TrayIcon)
    End If
    Main.Hide
End Sub

Public Sub FixTime(obj As TextBox)
    If Len(obj) = 2 Then
        obj.Text = obj.Text & ":"
        obj.SelStart = 3
    ElseIf Len(obj) = 5 Then
        obj.Text = obj.Text & ":"
        obj.SelStart = 6
    End If
End Sub
